package com.markerhub.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.markerhub.entity.Order;
import com.markerhub.mapper.OrderMapper;
import com.markerhub.service.OrderService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.markerhub.vo.AddressOrderVo;
import com.markerhub.vo.OrderUserVO;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 */
@Service
public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements OrderService {

    @Override
    public Page<OrderUserVO> getOrderUser(Page<OrderUserVO> page) {
        return page.setRecords(this.baseMapper.getOrderUser(page));
    }

    @Override
    public Page<AddressOrderVo> getAddressOrder(Page<AddressOrderVo> page, Integer userid) {
        return page.setRecords(this.baseMapper.getAddressOrder( page, userid));
    }

    @Override
    public Page<AddressOrderVo> getAllOrd(Page<AddressOrderVo> page) {
        return page.setRecords(this.baseMapper.getAllOrd( page));
    }
}
